/*
  keyof 表示获取一个类或者一个对象类型或者一个接口类型的所有属性名[key]组成的联合类型
*/
class Order {
  orderid: boolean;
  ordername: string;
  static count: number;
  printOrd() {}
  static getCount() {}
  constructor(orderid: boolean, ordername: string) {
    this.orderid = orderid;
    this.ordername = ordername;
  }
}

type OrderType = Order["orderid"];
type OrderKeyType = keyof Order;
let orderKey: OrderKeyType = "orderid";

type InstancePropKeys<T extends object> = keyof T;
type OrderKeyType2 = InstancePropKeys<Order>;
let orderKey2: OrderKeyType2 = "orderid";

export {};
